/*
 * Created on 9 juin 2004
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package mygui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;



/**
 * @author fsemiond
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class CommandeListener implements ActionListener{

private MonIHM ihm;

/**
 * The CommandeListener knows how to react to the clicks on the command buttons and on the simulation menu.  
 * @param ihm the MonIHM to which Commande and the menu belongs.
 */
	public CommandeListener(MonIHM ihm)
	{
	this.ihm = ihm;
	}

/**
 *  Actions to perform when an event occurs on command buttons or on menu items. 
 *@param e an event to which react.
 */
	public void actionPerformed(ActionEvent e)
	{}
	/*
		Object eo = e.getSource();
		System.out.println("CommandeListener >> simState" + ihm.getSimulator().getState());
		System.out.println("CommandeListener >> Source " + e.getSource());
		
		if(eo.equals(ihm.mesCommandes.play) || eo.equals(ihm.play))
		{
			
		}else 
		if((eo.equals(ihm.mesCommandes.pause) || eo.equals(ihm.pause))
			&& ihm.getSimulator().getState() == Simulator.PAUSE)
		{
			ihm.monNoyau.replaySim();
		}else
		if((eo.equals(ihm.mesCommandes.pause) || eo.equals(ihm.pause))
			&& ihm.getSimulator().getState() == Simulator.PLAY)
		{
			ihm.monNoyau.pauseSim();
		}else
		if(eo.equals(ihm.mesCommandes.stop) || eo.equals(ihm.stop))
		{
			//gestion menu
			ihm.monNoyau.stopSim();
		}else
		if(eo.equals(ihm.mesCommandes.snapshot) || eo.equals(ihm.snapshot))
		{
			ihm.monNoyau.snapShotSim();
		}else
		if(eo.equals(ihm.mesCommandes.reload) || eo.equals(ihm.reload))
		{
			// chargement de l'etat du reseau lors du start
			MonIHM.openSnapshot( ihm,MonIHM.class.getResource(".").getPath()+"cursnap");
		}
		// update menu and bar
		ihm.updateCommandes();
	}
	*/
}
